import HTTP from "./xhr"
/**
 * xxx 即可名称
 * @param params 参数注释
 * @returns 
 */
// export const apiGetPageMaintQuery =(params)=>{
//     return HTTP.post('/rm2/pageMaint/query', params);
//     // return HTTP.postForm('/pageMaint/query', params); // post表单
//     // return HTTP.get('/rm2/pageMaint/query', params);
// }   

/**
 * 启用
 */
export const apiEnable =(params)=>{
    return  HTTP.post('/rm2/userMaint/enable', params)
} 

//注册
export const apiRegist =(params)=>{
    return  HTTP.post('/rm2/userMaint/regist', params)
} 

//锁定用户
export const apiLock =(params)=>{
    return  HTTP.post('/rm2/userMaint/lock', params)
} 

//禁用
export const apiDisable =(params)=>{
    return  HTTP.post('/rm2/userMaint/disable', params)
} 

//解锁
export const apiUnlock =(params)=>{
    return  HTTP.post('/rm2/userMaint/unlock', params)
} 

//导出
export const apiExport =(params)=>{
    return  HTTP.exportApiFunc('/rm2/userMaint/export', params,'数据')
} 

//修改密码
export const apiUpdatePassword = (params)=>{
    return  HTTP.post('/rm2/userMaint/updatePassword', params)
} 
//获取用户列表
export const apiUserquery = (params)=>{
    return  HTTP.post('/rm2/userMaint/query', params)
} 
//获取当前启用部门树
export const apiGetDeptTree = (params)=>{
    return  HTTP.post('/rm2/userApi/getDeptTree', params)
} 
//变更部门
export const apialterDept = (params)=>{
    return  HTTP.post('/rm2/userMaint/alterDept', params)
}

//修改用户信息
export const apiUpdateInfo = (params)=>{
    return  HTTP.post('/rm2/userMaint/update', params)
}

//查询用户岗位列表
export const apiGetUserPosts = (params)=>{
    return  HTTP.post('/rm2/userApi/getUserPosts', params)
}

//重置密码
export const apiResetPassword = (params)=>{
    return  HTTP.post('/rm2/userMaint/resetPassword', params)
}

//系统管理员维护

//查询管理员列表
export const apiadminMaintquery = (params)=>{
    return  HTTP.post('/rm2/adminMaint/query', params)
}

//添加管理员
export const apiadminMaintinsert = (params)=>{
    return  HTTP.post('/rm2/adminMaint/insert', params)
}

//删除管理员
export const apiadminMaintdelete = (params)=>{
    return  HTTP.post('/rm2/adminMaint/delete', params)
}


//岗位管理

//查询岗位列表
export const apiPostquery = (params)=>{
    return  HTTP.post('/rm2/postMaint/query', params)
} 

//根据岗位id删除岗位-ok
export const apiPostdelete = (params)=>{
    return  HTTP.post('/rm2/postMaint/delete', params)
}

//新增岗位
export const apiPostinsert = (params)=>{
    return  HTTP.post('/rm2/postMaint/insert', params)
}

//查询岗位下人员-ok
export const apiQueryPostUsers = (params)=>{
    return  HTTP.post('/rm2/postMaint/queryPostUsers', params)
}

//保存岗位人员-ok
export const apiSavePostUsers = (params)=>{
    return  HTTP.post('/rm2/postMaint/savePostUsers', params)
}

//删除岗位人员-ok
export const apiDeletePostUsers = (params)=>{
    return  HTTP.post('/rm2/postMaint/deletePostUsers', params)
}


//用户组管理

//查询列表
export const apiGroupMaintquery = (params)=>{
    return  HTTP.post('/rm2/userGroupMaint/query', params)
}

//根据用户组id删除用户组
export const apiGroupMaintdelete = (params)=>{
    return  HTTP.post('/rm2/userGroupMaint/delete', params)
}

//删除用户组人员
export const apiDeleteGroupUsers = (params)=>{
    return  HTTP.post('/rm2/userGroupMaint/deleteGroupUsers', params)
}


//新增用户组
export const apiGroupMaintinsert = (params)=>{
    return  HTTP.post('/rm2/userGroupMaint/insert', params)
}

//查询用户组
export const apiGetUserGroups = (params)=>{
    return  HTTP.post('/rm2/userApi/getUserGroups', params)
}

//查询用户的岗位列表,包含部门信息
export const apiQueryUserPostsWithDept = (params)=>{
    return  HTTP.post('/rm2/userMaint/queryUserPostsWithDept', params)
}

//查询用户的用户组
export const apiGetUserGroupsByUser = (params)=>{
    return  HTTP.postForm('/rm2/userApi/getUserGroupsByUser', params)
}

//根据用户组查询用户列表
export const apiGetUsersByGroupNo = (params)=>{
    return  HTTP.postForm('/rm2/userApi/getUsersByGroupNo', params)
}

//保存用户组人员
export const apiSaveGroupUsers= (params)=>{
    return  HTTP.post('/rm2/userGroupMaint/saveGroupUsers', params)
}


//组织机构管理

//删除组织
export const apiDeptMaintdelete = (params)=>{
    return  HTTP.post('/rm2/deptMaint/delete', params)
}
//查询组织列表
export const apiDeptMaintquery = (params)=>{
    return  HTTP.post('/rm2/deptMaint/query', params)
}

//新增组织
export const apiDeptMaintsave = (params)=>{
    return  HTTP.post('/rm2/deptMaint/save', params)
}



//审计管理

//用户权限审计
export const apiUserAuthAudit = (params)=>{
    return  HTTP.post('/rm2/userAudit/userAuthAudit', params)
}

//用户权限审计导出
export const apiUserAuthExport = (params)=>{
    return  HTTP.exportApiFunc('/userAudit/userAuthExport', params,'数据')
}

//岗位成员审计
export const apiPostUserAudit = (params)=>{
    return  HTTP.post('/rm2/userAudit/postUserAudit', params)
}

//岗位成员审计导出
export const apiPostUserExport = (params)=>{
    return  HTTP.exportApiFunc('/userAudit/postUserExport', params,'数据')
}

//岗位和用户组权限审计
export const apiPostgroupAuthAudit = (params)=>{
    return  HTTP.post('/rm2/userAudit/postgroupAuthAudit', params)
}

//岗位和用户组权限审计--导出
export const apiPostgroupAuthExport = (params)=>{
    return  HTTP.exportApiFunc('/userAudit/postgroupAuthExport', params,'数据')
}

//用户组成员审计
export const apiGroupUserAudit = (params)=>{
    return  HTTP.post('/rm2/userAudit/groupUserAudit', params)
}

//用户组成员审计导出
export const apiGroupUserExport = (params)=>{
    return  HTTP.exportApiFunc('/userAudit/groupUserExport', params,'数据')
}

//用户行为审计查询
export const apilogAudit = (params)=>{
    return  HTTP.post('/rm2/userAudit/logAudit', params)
}

//用户行为审计导出
export const apilogExport = (params)=>{
    return  HTTP.exportApiFunc('/rm2/userAudit/logExport', params,'数据')
}

//权限管理

//获取用户菜单
export const apiGetMenu = (params)=>{
    return  HTTP.postForm(`/rm2/userAuth/getMenu`, params)
}

//查询权限
export const apiAuthMaintquery = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/query', params)
}

//新增权限
export const apiAuthMaintinsert = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/insert', params)
}


//删除权限
export const apiAuthMaintdelete = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/delete', params)
}

//根据主体ID删除权限
export const apiAuthdeleteBySubject = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/deleteBySubject', params)
}

//查询所有后端项目
export const apiListProject = (params)=>{
    return  HTTP.post('/rm2/backendPrjMaint/listProject', params)
}

//根据后端项目查询所有一级模块
export const apiListProject1 = (params)=>{
    return  HTTP.post('/rm2/backendPrjMaint/listModule1', params)
}

//根据后端项目查询所有二级模块
export const apiListProject2 = (params)=>{
    return  HTTP.post('/rm2/backendPrjMaint/listModule2', params)
}

//根据模块查询页面
export const apiQuery = (params)=>{
    return  HTTP.post('/rm2/pageMaint/query', params)
}

//查询按钮
export const apiBtnQuery = (params)=>{
    return  HTTP.post('/rm2/buttonMaint/query', params)
}


//在线用户管理

//查询列表接口
export const apOnlineUserQuery = (params)=>{
    return  HTTP.get('/rm2/onlineUser/query', params)
}

//注销用户
export const apOnlineUserDelete = (params)=>{
    return  HTTP.post(`/onlineUser/deleteOnlineUser`, params)
}

//组织树拖动
export const apiAlterParent = (params)=>{
    return  HTTP.post('/rm2/deptMaint/alterParent', params)
}



//菜单视角授权的树
export const apiGetFullMenuTreeForMaint = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/getFullMenuTreeForMaint', params)
}

//模块视角授权的树
export const apiGetFullModuleTreeForMaint = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/getFullModuleTreeForMaint', params)
}

//全量保存权限
export const apiSaveAuthoritys = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/saveAuthoritys', params)
}

//查询权限
export const apiAuthorityQueryAll = (params)=>{
    return  HTTP.post('/rm2/authorityMaint/queryAll', params)
}

// 全量用户权限审计

//查询
export const apiPageFullAuth = (params)=>{
    return  HTTP.post('/rm2/userAudit/pageFullAuth', params)
}

//导出
export const apiExportFullAuth = (params)=>{
    return  HTTP.exportApiFunc('/rm2/userAudit/exportFullAuth', params,'数据')
}










